package xyz.liuyuhe.StudySpring.ch11.methodreplace;

import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainMethod2 {
    public static void main(String[] args) {
        final ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(
                "classpath:ch11/methodreplace/Beans.xml");
        CommandManager m = ctx.getBean("commandManager", CommandManager.class);
        for (int i = 0; i < 5; i++) {
            m.process();
        }
        ctx.close();
    }
}